//
//  Fraction.h
//  OcDay3homework
//
//  Created by dllo on 16/5/24.
//  Copyright © 2016年 lanou. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface Fraction : NSObject
@property (nonatomic,assign) NSInteger member;
@property (nonatomic,assign) NSInteger denominator;
//自定义初始化
-(instancetype)initWithMember:(NSInteger)member withDenominator:(NSInteger)denominnator;
//便利构造器
+(instancetype)FractionWithMember:(NSInteger)member withDenominator:(NSInteger)denominnator;
//公约数
-(NSInteger)maxGCDWithNum1:(NSInteger)num1 withNum2:(NSInteger)num2;
//约分
-(void)reduction;
//加法
-(Fraction *)addWithFra:(Fraction *)fra;
//减法
-(Fraction *)minuWithFra:(Fraction *)fra;
//乘法
-(Fraction *)multipWithFra:(Fraction *)fra;
//除法
-(Fraction *)divisionWithFra:(Fraction *)fra;
//比较大小
-(NSComparisonResult)compareWithFra:(Fraction *)fra;
//输出方法
-(void)myPrint;

@end
